package dao;

import Utilsbao.JDBCUtils;

import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;

/**
 * Created by zhaoce on 18/1/5.
 */
public class comdao {



   public boolean denglv1(String acc,String pwd){
          boolean mark=false;
                    String sql="select * from user where acc=? and pwd=?";
                 PreparedStatement pstm =JDBCUtils.getConn(sql);

       try {
           pstm.setString(1,acc);
           pstm.setString(2,pwd);


        ResultSet re =pstm.executeQuery();
            mark   = re.next();

       } catch (SQLException e) {
           e.printStackTrace();
       }

         return mark;

       }







}
